package com.yingside.system.controller;


import com.yingside.common.util.ResultVO;
import com.yingside.system.service.IDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yingside
 * @since 2020-12-30
 */
@Controller
@RequestMapping("/dept")
public class DeptController {

    @Autowired
    private IDeptService deptService;

    @RequestMapping("/tree")
    @ResponseBody
    public ResultVO deptTree(){
        ResultVO success = ResultVO.success(deptService.selectAllDeptTree());
        System.out.println("success = " + success);
        return success;
    }
}
